package com.android.gtdroid;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author xlees
 *
 */
public class TaskItem {
	public static final int UNCOMPLETED = 0;
	public static final int COMPLETED = 1;
	public static final int CANCELLED = 2;	// trash
	
	public static final int NONE = 0;
	public static final int HIGH = 1;
	public static final int MEDIUM = 2;
	public static final int LOW = 3;
	
	private String taskName;
	private String taskNote;
	

	private String listName;
	
	private String context;
	private String project;
	private String position;
	
	private boolean allDay = true;	// default: true
	private String startTime;
	private String endTime;
	private String repeat;
	private String remind;
	
	private String prior;
	private String tags;
	private String created;
	
	private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	private int completed;		// default: false

	
	public boolean isAllDay() {
		return allDay;
	}

	public void setAllDay(boolean allDay) {
		this.allDay = allDay;
	}
	
	public int getCompletedStatus() {
		return completed;
	}

	public void setCompletedStatus(int completed) {
		this.completed = completed;
	}

	public TaskItem(String _taskName, String _listName) {
		taskName = _taskName;
		listName = _listName;
		created = sdf.format(new Date());
	}
	
	public TaskItem(String _taskName, String _taskNote, String _listName) {
		taskName = _taskName;
		taskNote = _taskNote;
		listName = _listName;
		created = sdf.format(new Date());
	}
	
	public String getTaskName() { return taskName; }
	
	public String getTaskNote() { return taskNote; }
	
	public String getListName() { return listName; }
	
	public String getContext() { return context; }
	
	public String getProject() { return project; }
	
	public String getPosition() { return position; }
	
	public String getStartTime() { return startTime; }
	
	public String getEndTime() { return endTime; }
	
	public String getRepeat() { return repeat; }
	
	public String getPrior() { return prior; }
	
	public String getRemind() { return remind; }
	
	public String getTags() { return tags; }

	public String getCreated() { return created; }
	
	public void setTaskName(String _taskName) { taskName = _taskName; }
	
	public void setTaskNote(String _taskNote) { taskNote = _taskNote; }
	
	public void setListName(String _listName) { listName = _listName; }
	
	public void setContext(String _context) { context = _context; }
	
	public void setProject(String _project) { project = _project; }
	
	public void setPosition(String _pos) { position = _pos; }
	
	public void setStartTime(String _startTime) { startTime = _startTime; }
	
	public void setEndTime(String _endTime) { endTime = _endTime; }
	
	public void setRepeat(String _repeat) { repeat = _repeat; }
	
	public void setPrior(String _prior) { prior = _prior; }
	
	public void setRemind(String _remind) { remind = _remind; }
	
	public void setTags(String _tags) { tags = _tags; }
	
	public void setCreated(String _created) { created = _created; }

	@Override
	public String toString() {
		return taskName;
	}
}